<template>
	<view class="bg-white">
		<cu-custom bgColor="bg-white" :isBack="true">
			<block slot="content">入职申请详情</block>
			<!-- <block slot="right">
				<button class="cu-btn bg-red shadow" @click="submit">提交待入职</button>
			</block> -->
		</cu-custom>
		<view style="padding: 15px;">
			<view style="background-color: #F3F5FC;border-radius: 10rpx;padding: 15px 10px;position: relative;">
				<text style="color: #4591FE;font-weight: 400;font-size: 12px;">
					<!-- 创建日期：{{dataObj.createTime.replaceAll('/','-')}} -->
					创建日期：{{dataObj.createTime}}
				</text>
				<view
					style="text-align: center;border-radius: 0px 10px 0px 10px;padding: 5px 10px;background-color: #3085FE;width: 80px;position: absolute;right: 0; top: 0;">
					<text style="color: #FFFFFF;">{{dataObj.approvalStatus_dictText}}</text>
				</view>
			</view>
			<view style="background-color: #fae1e1;border-radius: 10px;margin-top: 10px;"
				v-for="(item,index) in dataObj.blacklists" :key="index">
				<text
					style="color: #D30909;font-weight: 400;font-size: 12px;display: inline-block;margin-top: 10px;margin-left: 15px;">
					该人员在黑名单中
				</text>
				<text
					style="color: #1D1919;font-weight: 400;font-size: 12px;float:right;display: inline-block;margin-top: 10px;margin-right: 15px;"
					@click="remove">
					移除
				</text>
				<view style="background-color: #ededed;border-radius: 10px;padding: 10px 15px;margin-top: 10px;">
					<view>
						<text style="color: #101317;font-weight: 400;font-size: 12px;">
							原因：{{item.reason}}
						</text>
					</view>
					<view style="margin-top: 10px;">
						<text style="color: #101317;font-weight: 400;font-size: 12px;">
							黑名单公司：{{item.company}}
						</text>
					</view>
				</view>
			</view>

			<view style="margin-top: 20px;">
				<view class="action" style="margin-bottom: 10px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						基础信息
					</text>
				</view>
				<!-- <view class="flex" style="width: 300px;">
					<view class="flex" style="width: 300px;">
						<view class="flex-sub padding-sm margin-xs radius textStyle">
							照片
						</view>
						<view class="flex-sub padding-sm margin-xs radius">
							<image :src="dataObj.avatar"
								style="width: 79.88px;height: 110.44px;margin-right: 5px;" />
						</view>
					</view>
				</view> -->
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						姓名
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.userId_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						工号
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.workNo}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						婚姻状况
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.maritalStatus_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						性别
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.sex_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						民族
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.nation}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						籍贯
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.nativePlace}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						出生年月
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						<!-- {{dataObj.birthday.replaceAll('-','/')}} -->
						{{dataObj.birthday}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						年龄
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.age}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						学历
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.education}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						党团员
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.partyAndLeagueMembers_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						联系电话
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.phone}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						身份证号
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.idCard}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						身份证有效期
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						<!-- {{dataObj.idCardValidPeriod.replaceAll('-','/')}} -->
						{{dataObj.idCardValidPeriod}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						身份证地址
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.idCardAddress}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						现居住地址
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.currentAddress}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						毕业院校
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.graduationInstitution}}
					</view>
				</view>
			</view>

			<view style="margin-top: 10px;">

				<view class="action" style="margin-bottom: 10px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						宿舍信息
					</text>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						楼栋
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.buildingId_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						楼层
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.floorId_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						宿舍号
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.roomCode}}
					</view>
				</view>
			</view>
			<view style="margin-top: 10px;">
				<view class="action" style="margin-bottom: 10px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						职位信息
					</text>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						公司
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.company_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						部门
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.orgCodeTxt}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						部门类别
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.departmentType}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						车间
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.workshop}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						班次
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.classes}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						职务
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.post_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						职务等级
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.postLevel}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						职务归属
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.postType_dictText}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						员工状态
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.staffStatus}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						入职方式
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.onboardingMethods}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						入职时间
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						<!-- {{dataObj.createTime.replaceAll('-','/')}} -->
						{{dataObj.createTime}}
					</view>
				</view>
				<view class="flex" style="width: 300px;">
					<view class="flex-sub padding-sm margin-xs radius textStyle">
						住宿方式
					</view>
					<view class="flex-sub padding-sm margin-xs radius">
						{{dataObj.accommodationMethods_dictText}}
					</view>
				</view>
			</view>

			<view style="margin-top: 10px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						身份证信息正反面
					</text>
				</view>
				<view class="flex" style="width: 300px;padding: 10px;">
					<image :src="dataObj.idCardPhoto" class="avatar" @click="previewImage(dataObj.idCardPhoto)" />
				</view>
			</view>

			<view style="margin-top: 10px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						荣誉/证书
					</text>
				</view>
				<view class="flex" style="width: 300px;padding: 10px;">
					<view v-for="(item,index) in dataObj.honors" :key="index" style="display: flex;flex-wrap: wrap;">
						<image :src="item.newHonorFile" class="avatar" @click="previewImage(item.newHonorFile)"
							style="margin-right: 20rpx;" />
					</view>
				</view>
			</view>

			<view style="margin-top: 10px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						家庭成员
					</text>
				</view>
				<view style="padding: 10px;" v-for="(item,index) in dataObj.dafamilyMembers" :key="index">
					<view class="cu-form-group">
						<view class="title">与本人关系</view>
						<input name="input" v-model="item.relationship" disabled></input>
					</view>
					<view class="cu-form-group">
						<view class="title">姓名</view>
						<input name="input" v-model="item.name" disabled></input>
					</view>
					<view class="cu-form-group">
						<view class="title">电话</view>
						<input name="input" v-model="item.phone" disabled></input>
					</view>
					<view class="cu-form-group">
						<view class="title">单位</view>
						<input name="input" v-model="item.workUnit" disabled></input>
					</view>
				</view>
			</view>

			<view style="margin-top: 10px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						进厂前工作经历
					</text>
				</view>
				<view style="padding: 10px;" v-for="(item,index) in dataObj.resumes" :key="index">
					<view class="cu-form-group">
						<view class="title">单位名称</view>
						<input name="input" v-model="item.workUnit" disabled></input>
					</view>
					<view class="cu-form-group">
						<view class="title">开始时间</view>
						<!-- <input name="input" v-model="item.startTime.replaceAll('/','-')" disabled></input> -->
						<input name="input" v-model="item.startTime" disabled></input>
					</view>
					<view class="cu-form-group">
						<view class="title">结束时间</view>
						<!-- <input name="input" v-model="item.endTime.replaceAll('/','-')" disabled></input> -->
						<input name="input" v-model="item.endTime" disabled></input>
					</view>
					<view class="cu-form-group">
						<view class="title">职务</view>
						<input name="input" v-model="item.post" disabled></input>
					</view>
				</view>
			</view>

			<view style="margin-top: 15px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						其他事项
					</text>
				</view>
				<view style="padding: 5px 10px;" v-for="(item,index) in dataObj.otherMatters" :key="index">
					<view>
						<view class="cu-form-group">
							<view class="title">说明</view>
							<input name="input" v-model="item.reason" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">开始时间</view>
							<!-- <input name="input" v-model="item.createTime.replaceAll('/','-')" disabled></input> -->
							<input name="input" v-model="item.createTime" disabled></input>
						</view>
					</view>
				</view>
			</view>

			<view style="margin-top: 15px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						在本公司期间获得的荣誉及奖惩情况（选填）
					</text>
				</view>
				<view style="padding: 5px 10px;" v-for="(item,index) in dataObj.ourCompanyReceivesRewards" :key="index">
					<view>
						<view class="cu-form-group">
							<view class="title">奖/惩情况</view>
							<input name="input" v-model="item.rewards" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">离职详情</view>
							<input name="input" v-model="item.leaveReason" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">详情</view>
							<input name="input" v-model="item.reason" disabled></input>
						</view>
					</view>
				</view>
			</view>

			<view style="margin-top: 15px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						在本公司的成长记录（选填）
					</text>
				</view>
				<view style="padding: 5px 10px;" v-for="(item,index) in dataObj.growthRecords" :key="index">
					<view>
						<view class="cu-form-group">
							<view class="title">时间</view>
							<!-- <input name="input" v-model="item.createTime.replaceAll('/','-')" disabled></input> -->
							<input name="input" v-model="item.createTime" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">原因</view>
							<input name="input" v-model="item.reason" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">详情</view>
							<input name="input" v-model="item.details" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">转正详情</view>
							<input name="input" v-model="item.confirmationDetails" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">调岗详情</view>
							<input name="input" v-model="item.job_transfer_details" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">原部门</view>
							<input name="input" v-model="item.oriOrgCodeTxt" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">原职务</view>
							<input name="input" v-model="item.oriPost" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">现部门</view>
							<input name="input" v-model="item.orgCodeTxt" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">现职务</view>
							<input name="input" v-model="item.post" disabled></input>
						</view>
					</view>
				</view>
			</view>

			<view style="margin-top: 15px;">
				<view class="action" style="margin-bottom: 5px;">
					<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
					<text style="color: #5A607F;font-size: 25rpx;">
						附属职务（选填）
					</text>
				</view>
				<view style="padding: 5px 10px;" v-for="(item,index) in dataObj.subPosts" :key="index">
					<view>
						<view class="cu-form-group">
							<view class="title">公司</view>
							<input name="input" v-model="item.company" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">部门</view>
							<input name="input" v-model="item.orgCodeTxt" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">选择职务</view>
							<input name="input" v-model="item.post" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">职务类别</view>
							<input name="input" v-model="item.postType" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">职务名称</view>
							<input name="input" v-model="item.post" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">计费标准</view>
							<input name="input" v-model="item.freightBasis" disabled></input>
						</view>
						<view class="cu-form-group">
							<view class="title">职务等级</view>
							<input name="input" v-model="item.postLevel" disabled></input>
						</view>
					</view>
				</view>
			</view>
		</view>

		<view style="margin-top: 10px;">
			<view class="action" style="margin-bottom: 5px;">
				<text class="cuIcon-titles " style="color: #1E5EFF;"></text>
				<text style="color: #000000;font-weight: bold;font-size: 30rpx;">
					审批记录
				</text>
			</view>
			<view style="border-radius: 10px;margin-top: 10px;">
				<view class="cu-timeline" style=" background-color: rgba(249, 249, 249, 1);"
					v-for="(item,index) in approvalRecords">
					<view class="cu-item text-green cuIcon-roundcheckfill">
						<view style="display: flex;color: #000000;">
							<view style="width: 25px;">
								<text
									style="margin-left: -18px;margin-top: 5px;display: block;font-weight: bold;">{{item.currentNode_dictText}}</text>
							</view>
							<view style="margin-left: 20px;">
								<!-- <view>
									<text style="font-size: 28rpx;">{{item.approver_dictText}}</text>
									<text
										style="display: inline-block;padding: 2px;background-color: #d9d9d9;border-radius: 5px;font-size: 16rpx;margin-left: 10px;color: #a1a1a1;">{{item.remark}}</text>
									<text
										style="display: inline-block;padding: 4rpx 10rpx;background-color: #34b483;border-radius: 5px;font-size: 16rpx;margin-left: 15px;color: #FFFFFF;">{{item.approvalStatusDictText}}</text>
									
								</view> -->
								<!-- <view>
									<text style="font-size: 24rpx;">审核人：{{item.approverDictText}}</text>
									<text
										style="font-size: 20rpx;color: #c7c7c7;margin-left: 15px;">{{item.createTime}}</text>
								</view> -->
								<view style="font-size: 24rpx;margin-bottom:20rpx">审核人：{{item.approverDictText}}</view>
								<view style="font-size: 24rpx;margin-bottom:20rpx">{{item.createTime}}</view>
								<view
									style="padding: 20rpx;background-color: #34b483;border-radius: 20rpx;font-size: 24rpx;color: #FFFFFF;display: flex;justify-content: center;align-items: center;">
									{{item.approvalStatusDictText}}
								</view>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view
				style="padding: 30rpx; color: rgb(30, 94, 255);display: flex;justify-content: flex-start;align-items: center;"
				v-if="dataObj.approvalStatus == 6">
				<view style="margin-right: 30rpx;" @click.stop="goStay">住宿子流程</view>
				<view @click.stop="goContract">合同子流程</view>
			</view>
		</view>
		<view v-if="isShowBtn"
			style="display: flex;justify-content: space-around;align-items: center;padding-top: 20rpx;padding-bottom: 20rpx;">
			<view @click.stop="agree()">
				<button
					style="background-color: rgba(69, 145, 254, 1);border-radius: 20rpx;font-size:12px;padding: 10rpx 70rpx;color: rgba(255, 255, 255, 1);display: inline-block; ">同意</button>
			</view>
			<view @click.stop="disagree()">
				<button
					style="background-color: rgba(167, 52, 52, 1);border-radius: 20rpx;font-size:12px;padding: 10rpx 70rpx;color: rgba(255, 255, 255, 1);display: inline-block;">驳回</button>
			</view>
		</view>


		<uni-popup ref="agreePopup" background-color="#fff" :mask-click="false">
			<view
				style="text-align: center;background-color: #FFFFFF;padding: 11rpx;width: 580rpx;height: 470rpx;border-radius: 42rpx;">
				<view class="submit-item">
					<image class="submit-icon" src="@/static/images/editUserIcon.png" />
				</view>
				<view style="margin-top: 28rpx;">
					<text class="submit-text">确定要同意该申请吗</text>
				</view>
				<br>
				<view style="display: flex;">
					<button @click="sureAgree" style="border-radius: 20rpx; background-color: rgba(69, 145, 254, 1);
							color: rgba(255, 255, 255, 1);width: 230rpx;margin-top: 50rpx;">确定</button>
					<button @click="cancelAgree" style="border-radius: 20rpx; background-color: gray;
							color: rgba(255, 255, 255, 1);width: 230rpx;margin-top: 50rpx;">取消</button>
				</view>
			</view>
		</uni-popup>
		<uni-popup ref="isAgree" background-color="#fff" :mask-click="false">
			<view
				style="text-align: center;background-color: #FFFFFF;padding: 11rpx;width: 580rpx;height: 470rpx;border-radius: 42rpx;">
				<view class="submit-item">
					<image class="submit-icon" src="@/static/zhinengshenheshenchashenhe 1.png" />
				</view>
				<view style="margin-top: 28rpx;">
					<text class="submit-text">你已同意用户的申请</text>
				</view>
				<button @click="agreeCancel" style="border-radius: 20rpx; background-color: rgba(69, 145, 254, 1);
				color: rgba(255, 255, 255, 1);width: 300rpx;margin-top: 27rpx;">确定</button>
			</view>
		</uni-popup>
		<uni-popup ref="isDisagree" background-color="#fff" :mask-click="false">
			<view
				style="background-color: #FFFFFF;padding: 11rpx 30rpx;width: 580rpx;height: 400rpx;border-radius: 42rpx;">
				<view style="margin-top: 28rpx;margin-left: 15rpx;">
					<text class="submit-text">驳回</text>
				</view>
				<view class="cu-form-group"
					style="background-color: rgba(243, 243, 243, 1);border-radius: 15px;margin-top: 40rpx;height: 100rpx;">
					<input v-model="rejectReason" placeholder="请输入驳回理由" name="input" style="font-size: 25rpx;"></input>
				</view>
				<button style="background-color: rgba(217, 217, 217, 1);
							color: rgba(86, 85, 85, 1); margin-top: 30rpx;padding: 2rpx 85rpx; display: inline-block; "
					@click="rejectCancel">取消</button>
				<button style="background-color: rgba(69, 145, 254, 1);
				color: rgba(255, 255, 255, 1);margin-left:34rpx; display: inline-block;padding: 2rpx 85rpx; "
					@click="rejectSure">确定</button>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	import moment from 'moment';
	import configService from '@/common/service/config.service.js'
	export default {
		data() {
			return {
				isShowBtn: false,
				examineId: '',
				rejectReason: '',
				createTime: '',
				reason: '',
				blackCompany: '',
				dataObj: {},
				//黑名单
				blacklists: [],
				//家庭成员
				familyMembers: [{
					relationship: '',
					name: '',
					phone: '',
					unit: '',
				}],
				//进厂前工作经历
				resumes: [{
					unitName: '',
					startTime: '',
					endTime: '',
					post: '',
				}],
				//其他事项
				otherMatters: [{
					illustrate: '',
					createTime: '',
				}],
				//在本公司期间获得的荣誉及奖惩情况（选填）
				ourCompanyReceivesRewards: [{
					rewardsPunishments: '',
					departDetails: '',
					details: '',
				}],
				//在本公司的成长记录（选填）
				growthRecords: [{
					createTime: '',
					reason: '',
					details: '',
					confirmationDetails: '',
					jobTransferDetails: '',
					originalDepartment: '',
					originalPosition: '',
					currentDepartment: '',
					currentPosition: '',
				}],
				//附属职务（选填）
				subPosts: [{
					company: '',
					department: '',
					selectPosition: '',
					jobCategory: '',
					jobTitle: '',
					freightBasis: '',
					positionLevel: '',
				}],
				approvalRecords: [{
					title: '总经理',
					name: '陈婷婷',
					area: '手写区域',
					state: '同意',
					manager: '企管',
					createTime: '2023/10/10 12:00'
				}, {
					title: '车间',
					name: '陈婷婷',
					area: '手写区域',
					state: '同意',
					manager: '企管',
					createTime: '2023/10/10 12:00'
				}, {
					title: '填写申请单',
					name: '陈婷婷',
					area: '手写区域',
					state: '提交',
					manager: '企管',
					createTime: '2023/10/10 12:00'
				}]
			}
		},
		mounted() {

		},
		computed: {

		},
		onLoad: function(options) {
			this.dataObj.id = options.id;
			// 在这里可以使用获取到的 id 参数进行后续操作
			if (options.status && options.status == 3) {
				this.isShowBtn = true
				this.examineId = options.examineId
			} else {
				this.isShowBtn = false
				this.examineId = options.examineId
			}
		},
		created() {
			this.getDetail()
		},
		methods: {
			goStay() {
				// 住宿子流程
				console.log('this.dataObj',this.dataObj.userId)
				uni.navigateTo({
					url:'/pages/stayApplication/stayApplicationAdd/index?userId=' + this.dataObj.userId
				})
				
			},
			goContract() {
				//合同子流程
				uni.navigateTo({
					url:'/pages/contractList/contractListAdd/index?userId=' + this.dataObj.userId
				})
			},
			agree() {
				// this.examineId = item.id
				this.$refs.agreePopup.open('center')
			},
			disagree() {
				// this.examineId = item.id
				this.$refs.isDisagree.open('center')
			},
			sureAgree() {
				this.$http.post("/crm_on_hand/crmOnHand/agreeTrial", {
					id: this.examineId
				}).then(res => {
					console.log('同意申请', res)
					if (res.data.success) {
						this.$refs.isAgree.open('center')
						this.$refs.agreePopup.close()
						setTimeout(() => {
							uni.navigateTo({
								url: '/pages/toDoList/index'
							})
						}, 1000)

					} else {
						this.$tip.toast(res.data.message)
						this.$refs.agreePopup.close()
					}
				})
			},
			cancelAgree() {
				this.$refs.agreePopup.close()
			},
			agreeCancel() {
				this.$refs.isAgree.close()
			},
			rejectCancel() {
				this.$refs.isDisagree.close()
			},
			rejectSure() {
				this.$http.post("/crm_on_hand/crmOnHand/rejectTrial", {
					id: this.examineId,
					reason: this.rejectReason
				}).then(res => {
					if (res.data.success) {
						this.$refs.isDisagree.close()
						setTimeout(() => {
							uni.navigateTo({
								url: '/pages/toDoList/index'
							})
						}, 1000)
					} else {
						this.$tip.toast(res.data.message)
						this.$refs.isDisagree.close()
					}
				})
			},

			previewImage(imageUrl) {
				uni.previewImage({
					urls: [imageUrl],
				});
			},
			getFileAccessHttpUrl(avatar, subStr) {
				if (!subStr) subStr = 'http'
				if (avatar && avatar.startsWith(subStr)) {
					return avatar;
				} else {
					return configService.staticDomainURL + "/" + avatar;
				}
			},
			getDetail() {
				console.log("获取入职申请详情", this.dataObj.id)
				this.$http.get("/crm_employment_application/crmEmploymentApplication/queryEmploymentApplicationDetail/" +
						this.dataObj.id)
					.then(res => {
						console.log('入职申请-详情', res)
						if (res.data.success) {

							this.dataObj = res.data.result
							this.dataObj['avatar'] = this.getFileAccessHttpUrl(this.dataObj['avatar'])
							if (this.dataObj.idCardPhoto) {
								this.dataObj.idCardPhoto = this.getFileAccessHttpUrl(this.dataObj.idCardPhoto)
							}
							if (this.dataObj.honors && this.dataObj.honors.length > 0) {
								for (let i = 0; i < this.dataObj.honors.length; i++) {
									console.log('this.dataObj.honors[i]', this.dataObj.honors[i])
									if (this.dataObj.honors[i].honorFile) {
										console.log('this.dataObj.honors[i].honorFile', this.dataObj.honors[i]
											.honorFile)

										this.dataObj.honors[i].newHonorFile = this.getFileAccessHttpUrl(this.dataObj
											.honors[i].honorFile)
									} else {
										this.dataObj.honors[i].newHonorFile = ''
									}

								}
							}
							this.approvalRecords = this.dataObj.approvalRecords
							console.log('this.dataObj', this.dataObj)
						}
					})
			},
			submit() {
				console.log('提交待入职')
			},
			reUpload() {
				console.log('重新上传')
			},
			remove() {

			},
			//其他事项
			otherAdd() {

			},
			otherImport() {

			},
			otherDelete() {

			},
			//在本公司期间获得的荣誉及奖惩情况
			rewardsPunishmentsAdd() {

			},
			rewardsPunishmentsImport() {

			},
			rewardsPunishmentsDelete() {

			},
			//在本公司的成长记录
			growRecordAdd() {

			},
			growRecordImport() {

			},
			growRecordDelete() {
				this.growRecordTableData.pop()
			},
			//附属职务
			affiliatedPositionsAdd() {

			},
			affiliatedPositionsImport() {

			},
			affiliatedPositionsDelete() {

			},
		}
	}
</script>

<style>
	.submit-icon {
		width: 118rpx;
		height: 118rpx;
		margin-top: 58rpx;
	}

	.flex {
		display: flex;
		align-items: center;
	}

	.avatar {
		width: 160rpx;
		height: 200rpx;
	}

	.cu-form-group {
		background-color: #ffffff;
		line-height: 15px;
		padding: 0.5px 15px;
		display: flex;
		align-items: center;
		min-height: 42px;
		justify-content: space-between;
	}

	.cu-form-group uni-picker .picker {
		line-height: 15px;
		font-size: 15px;
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
		width: 100%;
		text-align: right;
	}

	.cu-form-group uni-picker::after {
		font-family: cuIcon;
		line-height: 15px;
		display: block;
		content: "\e6a3";
		position: absolute;
		font-size: 17px;
		color: #8799a3;
		width: 31px;
		text-align: center;
		top: 0;
		bottom: 0;
		right: -10px;
		margin: auto;
	}

	/deep/ .uni-radio-input {
		width: 15px;
		height: 15px;
	}

	.nav-right-image {
		width: 40rpx;
		height: 40rpx;
		margin-left: 15px;
	}

	.padding-sm {
		padding: 5px;
	}

	.textStyle {
		font-size: 13px;
		font-family: PingFang SC, PingFang SC;
		font-weight: 400;
		color: #101317;
		line-height: 22px;
	}

	.cu-form-group {
		background-color: #fafafa;
		padding: 0.5px 15px;
		display: flex;
		align-items: center;
		min-height: 0;
		justify-content: space-between;
	}

	.cu-form-group .title {
		text-align: justify;
		padding-right: 15px;
		font-size: 12px;
		position: relative;
		height: 31px;
		line-height: 31px;
	}

	.uni-input-input {
		font-size: 12px;
		position: relative;
		display: block;
		height: 100%;
		background: none;
		color: inherit;
		opacity: 1;
		line-height: inherit;
		letter-spacing: inherit;
		text-align: inherit;
		text-indent: inherit;
		text-transform: inherit;
		text-shadow: inherit;
	}

	.btnSpan {
		border-radius: 5px;
		border: 1px solid #D7DBEC;
		padding: 3px 10px;
	}
</style>